package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Customer;
import com.atguigu.jxc.entity.Goods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CustomerManagerDao {
    //根据客户名称模糊分页查询客户
    List<Goods> pageCustomerList(@Param("offSet") int offSet,
                                 @Param("rows") Integer rows,
                                 @Param("customerName") String customerName);

    //根据客户名称模糊分页查询客户数量
    Integer getCustomerCount(@Param("customerName") String customerName);

    //查询添加名称是否已经存在
    Customer findCustomerByName(@Param("customerName") String customerName);

    //添加客户
    Integer addCustomer(Customer customer);

    //修改客户
    Integer updateCustomer(Customer customer);

    //删除客户
    void deleteCustomers(List<String> list);
}

